{# jinja2递归 for in recursive ... loop() ... endfor #}
{% for sub_element_in_logic_controller in sort_by_order_in_logic_controller(logic_controller.id) recursive %}
  {% if sub_element_in_logic_controller.element_type == ELEMENT_TYPE.CASE %}
    {# 获取案例对象#}
    {% set case = get_case_from_id(sub_element_in_logic_controller.element_id) %}
    {% if can_show(case) %}
      {# 展示该测试场景下所有状态正常的测试组件#}
      {% include 'scene/_single_case.html' %}
    {% endif %}
  {% elif sub_element_in_logic_controller.element_type == ELEMENT_TYPE.TOOL %}
    {# 获取工具对象#}
    {% set tool = get_tool_from_id(sub_element_in_logic_controller.element_id) %}
    {% if can_show(tool) %}
      {# 展示该测试场景下所有状态正常的工具组件#}
      {% include 'scene/_single_tool.html' %}
    {% endif %}
  {% elif sub_element_in_logic_controller.element_type == ELEMENT_TYPE.LOGIC_CONTROLLER  %}
    {# 拿到对应逻辑控制数据#}
    {% set logic_controller = sub_element_in_logic_controller.get_element_logic_controller_if_element_type_is_logic_controller() %}
    {% if can_show(logic_controller) %}
      {# 设置include _single_logic_controller 导入类型#}
      {% set include_single_logic_controller_type = 'recursive' %}
      {% set nested_logic_controller_id = sub_element_in_logic_controller.element_id %}
      {# 将嵌套循环放入_single_logic_controller.html中#}
      {% include 'scene/_single_logic_controller.html' %}
      {# {{ loop(sort_by_order_in_logic_controller(sub_element_in_logic_controller.element_id)) }}#}
    {% endif %}
  {% endif %}
{% endfor %}